<?php

use think\Route;
//
//路由前缀与版本控制(v2版本)
Route::group(['method' => 'get'], function () {
    Route::group(':version/api', function () {
        Route::any('getIp', '\app\:version\common\controller\CarController@getIp');//获取访客ip
        Route::any('getApiVision', '\app\:version\common\controller\CarController@getApiVision');//获取版本更新
        Route::any('visitWebsite', '\app\:version\common\controller\CarController@visitWebsite');//访问官网,模拟
        Route::any('goods/goodsList', '\app\:version\common\controller\GoodsController@goodsList');//商品列表
        Route::any('goods/goodsInfo', '\app\:version\common\controller\GoodsController@goodsInfo');//商品详细
        Route::any('user/addressList', '\app\:version\common\controller\UserController@addressList');//地址列表
        Route::any('order/generalOrder', '\app\:version\common\controller\OrderController@generalOrder');//生成订单
        Route::any('order/orderList', '\app\:version\common\controller\OrderController@orderList');//订单列表
        Route::any('goods/getGoodsAutionPrice', '\app\:version\common\controller\GoodsController@getGoodsAutionPrice');//获取最新的竞拍价格
        Route::any('authUser', '\app\:version\common\controller\UserController@authUser');//获取用户信息
        Route::any('order/orderList', '\app\:version\common\controller\UserController@orderList');//获取订单列表
        Route::any('checkSignWechatMiniPay', '\app\:version\common\controller\UserController@checkSignWechatMiniPay');//回调
        Route::any('user/rechargeLog', '\app\:version\common\controller\UserController@rechargeLog');//充值记录
        Route::any('order/payOrderVerify', '\app\:version\common\controller\OrderController@payOrderVerify');//支付尾款回调
        Route::any('clockPublish', '\app\:version\common\controller\GoodsController@clockPublish');//定时任务(下架订单)
        Route::any('generalOrder', '\app\:version\common\controller\OrderController@generalOrder');//定时任务(生成订单)
        Route::any('user/userMoney', '\app\:version\common\controller\UserController@userMoney');//获取余额
        Route::any('bannerList', '\app\:version\common\controller\GoodsController@bannerList');//banner列表
        Route::any('user/userdrawBack', '\app\:version\common\controller\UserController@userdrawBack');//获取余额
        Route::any('generalOrderChange', '\app\:version\common\controller\OrderController@generalOrderChange');//定时任务(生成订单新规则)
        Route::any('order/notPayOrder', '\app\:version\common\controller\OrderController@notPayOrder');//查询未付款订单

    });
});

//路由前缀与版本控制(v2版本)
Route::group(['method' => 'post'], function () {
    Route::group(':version/api', function () {
        Route::any('user/login', '\app\:version\common\controller\UserController@login');//登陆
        Route::any('user/recharge', '\app\:version\common\controller\UserController@recharge');//充值
        Route::any('user/addOrEditAddress', '\app\:version\common\controller\UserController@addOrEditAddress');//添加地址
        Route::any('editAddress', '\app\:version\common\controller\UserController@editAddress');//编辑地址
        Route::any('order/payOrder', '\app\:version\common\controller\OrderController@payOrder');//支付
        Route::any('cancelOrder', '\app\:version\common\controller\OrderController@cancelOrder');//取消订单
        Route::any('returnOrder', '\app\:version\common\controller\OrderController@returnOrder');//退款
        Route::any('checkSignWechatMiniPay', '\app\:version\common\controller\UserController@checkSignWechatMiniPay');//回调
        Route::any('order/payOrder', '\app\:version\common\controller\OrderController@payOrder');//发起支付(尾款)
        Route::any('order/payAution', '\app\:version\common\controller\OrderController@payAution');//竞拍
        Route::any('order/payOrderVerify', '\app\:version\common\controller\OrderController@payOrderVerify');//支付尾款回调
        Route::any('order/payAutionChange', '\app\:version\common\controller\OrderController@payAutionChange');//竞拍(新规则)
    });
});


